<template>
  <div id="account_manage" class="container">
    <div class="content">
      <div class="title_tab">
        <div
          class="title_item"
          v-if="userInfo.roleMode!=2"
          :class="{title_active:menu == 1}"
          @click="selectTab(1)"
        >机构账户</div>
        <div
          class="title_item"
          :class="{title_active:menu == 2}"
          style="margin-left:0.3rem;"
          @click="selectTab(2)"
        >校区账户</div>
        <div
          style="margin-left:0.3rem;"
          class="title_item"
          :class="{title_active:menu == 3}"
          @click="selectTab(3)"
        >学员账户</div>
      </div>
      <div class="panel" v-if="menu < 3">
        <div class="condition">
          <div class="row_one">
            <el-select
              v-if="selectOrgVisible"
              v-model="searchParamTeacher.orgId"
              @change="changeOrg"
              style="width:1.8rem;"
              clearable
              placeholder="所有机构"
            >
              <el-option
                v-for="(row,index) in selectOrgList"
                :key="index"
                :label="row.orgName"
                :value="row.orgId"
              ></el-option>
            </el-select>
            <el-select
              v-if="selectSchoolVisible"
              v-model="searchParamTeacher.campusId"
              @change="changeSchool"
              style="width:1.8rem;"
              clearable
              filterable
              placeholder="所有校区"
            >
              <el-option
                v-for="(row,index) in selectSchoolList"
                :key="index"
                :label="row.name"
                :value="row.campusId"
              ></el-option>
            </el-select>
           
            <el-input
              v-if="menu == 2"
              style="width: 3.6rem;"
              placeholder="搜索 账号名、昵称、角色"
              v-model="searchParamTeacher.name"
              class="input_search"
              clearable
            ></el-input>
            <el-input
              v-else
              style="width: 3.6rem;"
              placeholder="搜索 账号名、昵称、角色、机构名"
              v-model="searchParamTeacher.name"
              class="input_search"
              clearable
            ></el-input>
            <div
              v-if="hasApi('userListPageByName')"
              @click="searchTeacher(1)"
              class="search_btn"
              style="margin-left:0.1rem;"
            >搜索</div>
            <div
              class="right_btn"
              style="margin-left:0.1rem;"
              v-if="hasApi('importStudent')"
              @click="openImport1()"
            >导入学员</div>
            <div class="right_btn" v-if="hasApi('importUser')" @click="openImport()">导入账户</div>
            <div class="left_btn" @click="openAdd" v-if="hasApi('userAdd')">新&nbsp&nbsp增</div>
          </div>
        </div>
        <div>
          <table class="table" cellspacing="0">
            <thead class="thead">
              <tr>
                <td style="width: 1rem;">编号</td>
                <td style="width: 3rem;">账号</td>
                <td style="width: 3rem;">名称</td>
                <td v-if="selectOrgVisible" style="width: 2rem;">所属机构</td>
                <td v-if="selectSchoolVisible" style="width: 3rem;">所属校区</td>
                <td style="width: 3rem;">角色</td>
                <!-- <td style="width: 2rem;">标签</td> -->
                <td style="width: 3rem;">状态</td>
                <td style="width: 3rem;">创建时间</td>
                <td style="width: 2rem;">创建人</td>
                <td style="width: 5rem;">操作</td>
              </tr>
            </thead>
            <tbody class="tbody">
              <tr v-for="item,index in accountList">
                <td>{{index+1}}</td>
                <td>{{item.username}}</td>
                <td>{{item.nickName}}</td>
                <td v-if="selectOrgVisible">{{item.orgName}}</td>
                <td v-if="selectSchoolVisible">
                  <div
                    style="cursor: pointer;line-height: 0.3rem;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;overflow: hidden;"
                  >{{item.schoolName}}</div>
                </td>
                <td>{{item.roleName}}</td>
                <!-- <td>{{item.tagName}}</td> -->
                <td v-bind:class="{noStatus:item.status != 1}">{{item.statusText}}</td>
                <td>{{item.createTime}}</td>
                <td>{{item.createUserName}}</td>
                <td>
                  <span
                    v-if="hasApi('userListPageByName')"
                    class="operate_btn"
                    style="color:#67C23A;"
                    @click="handleLook(index,item)"
                  >查看</span>

                  <span
                    v-if="item.isEditable !=0  && hasApi('userUpdate')"
                    class="operate_btn"
                    @click="handleEdit(index,item)"
                  >&nbsp;编辑</span>

                  <span
                    v-if="hasApi('resetPassword')"
                    class="operate_btn"
                    @click="handlePWD(index,item) "
                  >&nbsp;重置密码</span>

                  <span
                    v-if="item.isEditable !=0 && hasApi('userToogleStatus')"
                    class="operate_btn"
                    @click="handleDelete(index,item)"
                  >&nbsp;{{item.status == 1?"禁用":"启用"}}</span>
                  <span
                    v-if="item.isEditable !=0  && hasApi('userDelete')"
                    class="operate_btn"
                    @click="handleDeleteUser(index,item)"
                  >&nbsp;删除</span>
                  <span
                    v-if="hasApi('efficientreadauthinfoAdd')"
                    class="operate_btn"
                    @click="handleEmpower(index,item)"
                  >
                    &nbsp;
                    <img
                      v-if="item.isEmpower"
                      class="empower_img"
                      src="../../assets/img/education_manage/success_create.png"
                    />
                    授权
                  </span>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
        <el-pagination
          class="page"
          layout="total, sizes, prev, pager, next, jumper"
          :current-page="searchParamTeacher.currPage"
          @size-change="pageSizeChange"
          :page-size.sync="searchParamTeacher.pageSize"
          @current-change="tabledisplayChangePage"
          :total="tabledisplayObj.total"
        ></el-pagination>
      </div>
      <div class="panel" v-else>
        <div class="condition">
          <div class="row_one">
            <el-select
              v-if="selectOrgVisible"
              v-model="searchParamStudent.orgId"
              @change="changeOrg"
              style="width:1.8rem;"
              clearable
              placeholder="所有机构"
            >
              <el-option
                v-for="(row,index) in selectOrgList"
                :key="index"
                :label="row.orgName"
                :value="row.orgId"
              ></el-option>
            </el-select>
            <el-select
              v-if="selectSchoolVisible"
              v-model="searchParamStudent.campusId"
              @change="changeSchool"
              style="width:1.8rem;"
              clearable
              placeholder="所有校区"
            >
              <el-option
                v-for="(row,index) in selectSchoolList"
                :key="index"
                :label="row.name"
                :value="row.campusId"
              ></el-option>
            </el-select>
            <el-input
              style="width: 3.6rem;"
              placeholder="搜索 ID、账户、姓名"
              suffix-icon="el-icon-search"
              v-model="searchParamStudent.generalTerm"
              class="input_search"
              clearable
            ></el-input>
            <div @click="searchStudent(1)" class="search_btn" style="margin-left:0.1rem;">搜索</div>
          </div>
        </div>
        <div>
          <table class="table" cellspacing="0">
            <thead class="thead">
              <tr>
                <td style="width: 3rem;">ID</td>
                <td style="width: 3rem;">账号</td>
                <td style="width: 3rem;">姓名</td>
                <td v-if="selectOrgVisible" style="width: 2rem;">所属机构</td>
                <td v-if="selectSchoolVisible" style="width: 3rem;">所属校区</td>
                <td style="width: 3rem;">注册来源</td>
                <td style="width: 5rem;">注册时间</td>
                <td style="width: 5rem;">最近一次登录时间</td>
                <td style="width: 3rem;">创建人</td>
                <td style="width: 3rem;">操作</td>
              </tr>
            </thead>
            <tbody class="tbody">
              <tr v-for="item,index in userList">
                <td>{{item.studentUserId}}</td>
                <td>{{item.username}}</td>
                <td>{{item.clueList? item.clueList[0].realName : ''}}</td>
                <td v-if="selectOrgVisible">{{item.orgName}}</td>
                <td v-if="selectSchoolVisible">{{item.campusName}}</td>
                <td>{{item.regSourceMode == 0?'官网':'微官网'}}</td>
                <td>{{item.regTime}}</td>
                <td>{{item.recentLoginTime}}</td>
                <td>{{item.createUserName}}</td>
                <td>
                  <span
                    v-if="hasApi('userListPage')"
                    class="operate_btn"
                    style="color:#67C23A;"
                    @click="handleLook_user(index,item)"
                  >查看</span>
                  &nbsp;
                  <span
                    v-if="hasApi('studentToogleStatus')"
                    class="operate_btn"
                    @click="handleDelete_user(index,item)"
                  >{{item.isUse == '1'?"禁用":"启用"}}</span>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
        <el-pagination
          class="page"
          layout="total, sizes, prev, pager, next, jumper"
          :current-page="searchParamStudent.currPage"
          @size-change="pageSizeChange_user"
          :page-size.sync="searchParamStudent.pageSize"
          @current-change="tabledisplayChangePage_user"
          :total="tabledisplayObj_user.total"
        ></el-pagination>
      </div>
    </div>
    <accountAdd ref="accountAdd" @callback="closeAdd"></accountAdd>
    <accountLook ref="accountLook" @callback="closeLook"></accountLook>
    <userLook ref="userLook" @callback="closeLook"></userLook>
    <accountImport ref="accountImport" @callback="closeImport"></accountImport>
    <studentImport ref="studentImport" @callback="closeImport1"></studentImport>
    <empower ref="empower" @callback="closeAdd"></empower>
  </div>
</template>

<script>
// import { mapState, mapGetters, mapActions } from "vuex"; //先要引入
import accountAdd from "./subpage/account_add";
import accountLook from "./subpage/account_look";
import userLook from "./subpage/user_look";
import studentImport from "../education_manage/common/studentImport";
import accountImport from "./subpage/account_import";
import empower from "./subpage/empower";
let vm;
let user;
export default {
  components: {
    accountAdd,
    accountLook,
    accountImport,
    studentImport,
    empower,
    userLook
  },
  data() {
    return {
      /**1-机构；2-校区；3-学员 */
      menu: 1,
      isAdmin: false,
      orgId: [],
      searchText: "", //搜索框输入文本
      searchText_user: "",
      tabledisplayObj: {
        size: 10,
        total: 0
      },
      tabledisplayObj_user: {
        size: 10,
        total: 0
      },
      accountList: [],
      userList: [],

      userInfo: null,
      selectOrgList: [],
      selectOrgVisible: false,
      selectSchoolList: [],
      selectSchoolVisible: false,
      /**机构、校区用户搜索条件 */
      searchParamTeacher: {
        viewFlagOfRoleMode: 1,
        orgId: "",
        campusId: "",
        currPage: 1,
        pageSize: 10,
        name: "",
        hardwareId: ""
      },
      /**学员搜索条件 */
      searchParamStudent: {
        orgId: "",
        campusId: "",
        currPage: 1,
        pageSize: 10,
        generalTerm: ""
      }
    };
  },
  watch: {
    // 如果 `searchText` 发生改变，这个函数就会运行
    // searchText: function(newSearchText, oldSearchText) {
    //   if (newSearchText == "") {
    //     this.tabledisplayObj.currentPage = 1;
    //     this.isShowSearch = false;
    //     this.initData();
    //   }
    // },
    // // 如果 `searchText_user` 发生改变，这个函数就会运行
    // searchText_user: function(newSearchText, oldSearchText) {
    //   if (newSearchText == "") {
    //     this.tabledisplayObj_user.currentPage = 1;
    //     this.isShowSearch = false;
    //     this.initData_user();
    //   }
    // }
  },
  methods: {
    /**
     * 导入回调
     */
    closeImport1(data) {},
    /**
     * 导入学员模板
     */
    openImport1() {
      vm.$refs.studentImport.init();
    },
    /**
     * 导入账户
     */
    openImport() {
      vm.$refs.accountImport.init();
    },
    //切换tab
    selectTab(index) {
      vm.menu = index;
      this.resetSearchParam();
      if (index == 1) {
        //机构
        this.searchParamTeacher.viewFlagOfRoleMode = 1;
        this.searchTeacher(1);
      } else if (index == 2) {
        //校区
        this.searchParamTeacher.viewFlagOfRoleMode = 2;
        this.searchTeacher(1);
      } else {
        //学员
        this.searchStudent(1);
      }
      this.showSelectOrgSchool();
    },
    resetSearchParam() {
      if (this.userInfo.roleMode == 0) this.searchParamTeacher.orgId = "";
      if (this.userInfo.roleMode != 2) this.searchParamTeacher.campusId = "";
      this.searchParamTeacher.currPage = 1;
      this.searchParamTeacher.pageSize=10;
      this.searchParamTeacher.name = "";
      this.searchParamTeacher.hardwareId = "";

      if (this.userInfo.roleMode == 0) this.searchParamStudent.orgId = "";
      if (this.userInfo.roleMode != 2) this.searchParamStudent.campusId = "";
      this.searchParamStudent.currPage = 1;
      this.searchParamStudent.pageSize = 10;
      this.searchParamStudent.generalTerm = "";
    },
    campusChange: function(campusId) {
      if (this.userInfo.roleMode == 2) {
        this.searchParamTeacher.campusId = campusId;
        this.searchParamStudent.campusId = campusId;
        if (this.menu != 3) this.searchTeacher(1);
        else this.searchStudent(1);
      }
    },
    /**
     * 抽取出来获取列表
     */
    getData_user(paras) {
      let usertemp = []; //临时存放课列表
      api.userListPage(paras).then(function(data) {
        if (data.resultCode == 2000) {
          usertemp = data.list;
          // for (let i = 0; i < usertemp.length; i++) {
          //   usertemp[i].createTime = usertemp[i].createTime.split(" ")[0];
          // }
          vm.tabledisplayObj_user.total = data.totalCount;
          vm.userList = usertemp;
        } else {
          vm.$message.error(data.message);
        }
      });
    },
    /**
     * 抽取出来获取列表
     */
    getData(paras) {
      // if (user.roleMode > 0) {
      //   paras.campusId = vm.$store.state.campusId;
      // }
      let accounttemp = []; //临时存放课列表
      api
        .userListPageByName(paras)
        .then(function(data) {
          if (data.resultCode == 2000) {
            accounttemp = data.list;
            let accountIdList = [];
            for (let i = 0; i < accounttemp.length; i++) {
              accountIdList.push(accounttemp[i].userId);
              accounttemp[i].isEmpower = false;
              accounttemp[i].createTime = accounttemp[i].createTime.split(
                " "
              )[0];
              accounttemp[i].orgName = "";
              if (
                accounttemp[i].orgNameList &&
                accounttemp[i].orgNameList.length > 0
              ) {
                accounttemp[i].orgNameList.forEach(item => {
                  accounttemp[i].orgName +=
                    accounttemp[i].orgName == "" ? item : "," + item;
                });
              }
              accounttemp[i].schoolName = "";
              if (
                accounttemp[i].campusNameList &&
                accounttemp[i].campusNameList.length > 0
              ) {
                accounttemp[i].campusNameList.forEach(item => {
                  accounttemp[i].schoolName +=
                    accounttemp[i].schoolName == "" ? item : "," + item;
                });
              }
              accounttemp[i].tagName = "";
              accounttemp[i].tagList.forEach(item => {
                accounttemp[i].tagName +=
                  accounttemp[i].tagName == ""
                    ? item.tagName
                    : "," + item.tagName;
              });
              if (accounttemp[i].status == 1) {
                accounttemp[i].statusText = "正常";
              } else {
                accounttemp[i].statusText = "禁用";
              }
            }
            vm.tabledisplayObj.total = data.totalCount;
            if (vm.hasApi("efficientreadauthinfoAdd")) {
              return api.efficientreadauthinfoList({ userIds: accountIdList });
            } else {
              vm.accountList = accounttemp;
              return Promise.reject();
            }
          } else {
            vm.$message.error(data.message);
          }
        })
        .then(function(data) {
          if (data.resultCode == 2000) {
            for (let j = 0; j < accounttemp.length; j++) {
              accounttemp[j].empower = [];
              for (let i = 0; i < data.list.length; i++) {
                if (accounttemp[j].userId == data.list[i].sysUserId) {
                  accounttemp[j].isEmpower = true;
                  accounttemp[j].empower.push(data.list[i]);
                }
              }
            }
            vm.accountList = accounttemp;
          } else {
            vm.$message.error(data.message);
          }
        });
    },
    pageSizeChange_user: function(val) {
      //页条数发生改变
      this.searchParamStudent.pageSize = val;
      this.searchStudent(1);
    },
    /**表格显示形式翻页 */
    tabledisplayChangePage_user(val) {
      this.searchParamStudent.currPage = val;
      this.searchStudent();
    },
    pageSizeChange: function(val) {
      //页条数发生改变
      this.searchParamTeacher.pageSize = val;
      this.searchTeacher(1);
    },
    /**表格显示形式翻页 */
    tabledisplayChangePage(val) {
      this.searchParamTeacher.currPage = val;
      this.searchTeacher();
    },
    openAdd() {
      vm.$refs.accountAdd.init({});
    },
    closeLook(data) {},
    closeImport(data) {
      this.searchTeacher(1);
    },
    closeAdd(data) {
      this.searchTeacher(1);
    },
    handlePWD(index, row) {
      var paras = {
        userId: "" + row.userId
      };
      api.resetPassword(paras).then(function(data) {
        console.log(data);
        if (data.result == "操作成功") {
          vm.$message({
            message: "重置成功",
            type: "success"
          });
        } else {
          this.$message.error(data.result);
        }
      });
    },
    handleLook(index, row) {
      console.log(row);
      let data = JSON.parse(JSON.stringify(row));
      vm.$refs.accountLook.init(data);
    },
    handleLook_user(index, row) {
      let data = JSON.parse(JSON.stringify(row));
      vm.$refs.userLook.init(data);
    },
    /**
     * 授权
     */
    handleEmpower(index, row) {
      let paras = {};
      let empowerStartTime = "";
      let empowerEndTime = "";

      for (let i = 0; i < user.campusList.length; i++) {
        if (this.$store.state.campusId == user.campusList[i].campusId) {
          empowerStartTime = user.campusList[i].serveStartTime;
          empowerEndTime = user.campusList[i].serveEndTime;
          break;
        }
      }
      paras = {
        isAdd: true,
        empowerStartTime: empowerStartTime,
        empowerEndTime: empowerEndTime,
        sysUserId: row.userId
      };
      if (row.isEmpower) {
        paras.empowerDataList = tool.clone(row.empower);
        paras.isAdd = false;
      }
      console.log(paras);
      vm.$refs.empower.init(paras);
    },
    /**
     * 点击编辑
     */
    handleEdit(index, row) {
      console.log(row);
      vm.$refs.accountAdd.init(JSON.parse(JSON.stringify(row)));
    },
    handleDeleteUser(index, row) {
      this.$confirm("此操作将删除该账户, 是否继续?", "温馨提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
        center: true
      })
        .then(() => {
          var paras = {
            userId: row.userId
          };
          api.userDelete(paras).then(function(data) {
            console.log(data);
            if (data.result == "操作成功") {
              vm.$message({
                message: "删除成功",
                type: "success"
              });
              vm.searchTeacher(1);
            } else {
              this.$message.error(data.result);
            }
          });
        })
        .catch(() => {});
    },
    handleDelete_user(index, row) {
      if (row.isUse == "1") {
        this.$confirm("此操作将禁用该账户, 是否继续?", "温馨提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
          center: true
        })
          .then(() => {
            var paras = {
              studentUserId: row.studentUserId,
              isUse: "0"
            };
            api.studentToogleStatus(paras).then(function(data) {
              console.log(data);
              if (data.resultCode == 2000) {
                vm.$message({
                  message: "禁用成功",
                  type: "success"
                });
                vm.searchStudent();
              } else {
                this.$message.error(data.message);
              }
            });
          })
          .catch(() => {});
      } else {
        this.$confirm("此操作将启用该账户, 是否继续?", "温馨提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
          center: true
        })
          .then(() => {
            var paras = {
              studentUserId: row.studentUserId,
              isUse: "1"
            };
            api.studentToogleStatus(paras).then(function(data) {
              console.log(data);
              if (data.resultCode == 2000) {
                vm.$message({
                  message: "启用成功",
                  type: "success"
                });
                vm.searchStudent();
              } else {
                this.$message.error(data.message);
              }
            });
          })
          .catch(() => {});
      }
    },
    /**
     * 点击删除
     */
    handleDelete(index, row) {
      console.log(index, row);
      if (row.status == "1") {
        this.$confirm("此操作将禁用该账户, 是否继续?", "温馨提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
          center: true
        })
          .then(() => {
            var paras = {
              userId: row.userId,
              status: "0"
            };
            api.userToogleStatus(paras).then(function(data) {
              console.log(data);
              if (data.result == "操作成功") {
                vm.$message({
                  message: "禁用成功",
                  type: "success"
                });
                vm.searchTeacher();
              } else {
                this.$message.error(data.result);
              }
            });
          })
          .catch(() => {});
      } else {
        this.$confirm("此操作将启用该账户, 是否继续?", "温馨提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
          center: true
        })
          .then(() => {
            var paras = {
              userId: row.userId,
              status: "1"
            };
            api.userToogleStatus(paras).then(function(data) {
              console.log(data);
              if (data.result == "操作成功") {
                vm.$message({
                  message: "启用成功",
                  type: "success"
                });
                vm.searchTeacher();
              } else {
                this.$message.error(data.result);
              }
            });
          })
          .catch(() => {});
      }
    },
    /**
     * 搜索
     */
    searchTeacher(pgIndex) {
      this.searchParamTeacher.currPage =
        pgIndex || this.searchParamTeacher.currPage;
      this.getData(this.searchParamTeacher);
    },
    searchStudent(pgIndex) {
      this.searchParamStudent.currPage =
        pgIndex || this.searchParamStudent.currPage;
      this.getData_user(this.searchParamStudent);
    },
    getOrgList() {
      api.orgList().then(function(data) {
        if (data.resultCode == 2000) {
          vm.selectOrgList = data.list;
        }
      });
    },
    getSchoolListById(id) {
      api.campusListByOrg({ orgId: id }).then(function(data) {
        if (data.resultCode == 2000) {
          vm.selectSchoolList = data.list;
          vm.searchParamTeacher.se;
        }
      });
    },
    /**切换选择机构 */
    changeOrg(val) {
      //重新获取校区列表
      vm.selectSchoolList = [];
      vm.searchParamTeacher.campusId = "";
      vm.searchParamStudent.campusId = "";
      this.getSchoolListById(val);
    },
    /**切换选择校区 */
    changeSchool(val) {
      this.searchParamTeacher.campusId = val || "";
    },
    /**判断是否显示 机构、校区筛选控件
     * @param roleMode 0-系统管理员；1-机构；2-校区
     * @param menu 当前菜单 1-机构；2-校区；3-学员
     */
    showSelectOrgSchool() {
      let roleMode = this.userInfo.roleMode;
      let menu = this.menu;
      this.selectOrgVisible = false;
      this.selectSchoolVisible = false;
      switch (roleMode) {
        case 0:
          {
            if (menu == 1) this.selectOrgVisible = true;
            else if (menu == 2 || menu == 3) {
              this.selectOrgVisible = true;
              this.selectSchoolVisible = true;
            }
          }
          break;
        case 1:
          {
            if (menu == 2 || menu == 3) {
              this.selectSchoolVisible = true;
            }
          }
          break;
        case 2:
          {
          }
          break;
      }
    }
  },
  mounted() {
    vm = this;
    user = tool.getItem(lsKey.user, true); //得到当前用户信息
    if (user.roleMode == 0) {
      vm.isAdmin = true;
    }
  },
  computed: {},
  created: function() {
    this.userInfo = tool.getItem(lsKey.user, true);
    if (this.userInfo.roleMode == 2) {
      this.menu = 2;
      this.searchParamTeacher.viewFlagOfRoleMode = 2;
      this.searchParamTeacher.orgId = this.userInfo.orgId;
      this.searchParamStudent.orgId = this.userInfo.orgId;
      this.searchParamTeacher.campusId = this.$store.state.campusId;
      this.searchParamStudent.campusId = this.$store.state.campusId;
    } else if (this.userInfo.roleMode == 1) {
      this.searchParamTeacher.orgId = this.userInfo.orgId;
      this.searchParamStudent.orgId = this.userInfo.orgId;
    }
    this.showSelectOrgSchool();
    if (this.selectOrgVisible) {
      this.getOrgList();
    }
    if (this.userInfo.roleMode == 1) {
      this.getSchoolListById(this.userInfo.orgId);
    }
    this.searchTeacher(1);
    // this.searchStudent(1);
  }
};
</script>

<style lang="scss">
#account_manage {
  .right_btn {
    background-image: url(../../assets/img/clue_manage/download.png);
  }
  .el-input__inner {
    border-radius: 0.08rem;
    font-size: 0.16rem;
    color: #666666;
    height: 0.36rem;
    line-height: 0.36rem;
  }
  .el-input__icon {
    line-height: 0.36rem;
  }

  .input_search {
    .el-input__inner {
      background-color: rgb(247, 248, 250);
    }
  }
  .empower_img {
    position: relative;
    top: 0.04rem;
    right: -0.04rem;
    width: 0.18rem;
    height: 0.18rem;
  }
}
</style>
<style scoped src="@/style/module/table.css"></style>
<style scoped src="@/style/clue_manage/clue_manage.css"></style>
<style scoped>
.title_tab {
  display: flex;
}
.title_item {
  font-size: 0.24rem;
  color: #999999;
  text-shadow: 0.01rem 0 0 currentcolor;
  line-height: 0.6rem;
  cursor: pointer;
}
.title_active {
  color: #141414;
}
</style>